using System;
using System.Data;
using System.Configuration;
using System.Collections.Generic;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FitnessClub.Bll.AccountManager;
using FitnessClub.Bll.Facade.Dictionary;

public partial class TicketManager : System.Web.UI.Page
{
    #region Page_Load
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
        }

		string login = StateManager.Instance.GetFromSession<string>(SessionKeys.TicketsSummaryLogin);
		LabelLogin.Text = login;

		List<Ticket> listaTicket = Delegate.getTicketsForUserLogin(login);

		foreach (Ticket item in listaTicket)
		{
			if (item.TypeOfTicket == TypeOfTicket.PointsTicket)
			{
				LabelPointsTicket_value.Text = item.Points.ToString();
			}
			else if (item.TypeOfTicket == TypeOfTicket.DaysTicketLimited)
			{
				if (item.Expired == null) LabelDaysTicketLimited_value.Text = "null";
				else LabelDaysTicketLimited_value.Text = item.Expired.ToString();
			}
			else if (item.TypeOfTicket == TypeOfTicket.DaysTicketUnlimited)
			{
				if (item.Expired == null) LabelDaysTicketUnlimited_value.Text = "null";
				else LabelDaysTicketUnlimited_value.Text = item.Expired.ToString();
			}
		}

    } 
    #endregion



	protected void Cancel_Click(object sender, EventArgs e)
	{
		Response.Redirect("Recepcjonista.aspx");
	}
}
